package com.pinxixi.brand.mapper;

import com.pinxixi.framework.domain.brand.Brand;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface BrandMapper {

    @Select("select id,name,first_char firstChar from tb_brand")
    List<Brand> findAll();

    List<Brand> findPage(Map map);

    Integer findCount(Brand brand);

    Brand findOne(Long id);

    Brand findByName(String name);

    void add(Brand brand);

    void edit(Brand brand);

    @Delete("delete from tb_brand where id=#{id}")
    void deleteById(Long id);

    void deleteAll(Long[] ids);
}
